<?php
/*
*	文章作者关联表
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Associates_m extends MY_Model
{
    public function __construct()
    {
        parent::__construct();
        $this->table = 'associates';
    }
     //查询所有 文章作者关联表和学生表
    public function selAll($where = array(), $field = "*", $order = 'id desc')
    {
        $this->com_where($where);
        $this->db->select($field);
        $this->db->order_by($order);
         $this->db->from($this->table." as A");
        $this->db->join('student as B','B.id=A.studentid');
        $query = $this->db->get();
        $data = $query->result_array();
        return $data;
    }
 }
 ?>